import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    children:[
      {path: '/user', component: () => import('../views/user/UserView.vue')},
      {path: '/currentStudent', component: () => import('../views/student/CurrentStudentView.vue')},
      {path: '/graduateStudent', component: () => import('../views/student/GraduatedStudentView.vue')},
      {path: '/lessonProgress', component: () => import('../views/student/LessonProgressView.vue')},
      {path: '/registrationRecord', component: () => import('../views/student/RegistrationRecordView.vue')},
      {path: '/subject', component: () => import('../views/lesson/SubjectView.vue')},
      {path: '/lesson', component: () => import('../views/lesson/LessonView.vue')},
      {path: '/staff', component: () => import('../views/system/StaffView.vue')},
      {path: '/role', component: () => import('../views/system/RoleView.vue')},
      {path: '/perm', component: () => import('../views/system/PermView.vue')},
      {path: '/paymentRecord', component: () => import('../views/finance/PaymentRecordView.vue')},
      {path: '/askFor', component: () => import('../views/education/AskForView.vue')},
      {path: '/course', component: () => import('../views/education/CourseView.vue')},
      {path: '/coursePlan', component: () => import('../views/education/CoursePlanView.vue')},
      {path: '/class', component: () => import('../views/education/ClassView.vue')},
      {path: '/classRoom', component: () => import('../views/education/ClassRoomView.vue')},
      {path: '/appointment', component: () => import('../views/education/AppointmentView.vue')},

    ]
  },

  {path: '/login', component: () => import('../views/LoginView')}
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
